package com.yuwubao;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * <Description> <br>
 *
 * @author wk <br>
 * @version 1.0<br>
 * @taskId <br>
 * @CreateDate 2017/6/22 <br>
 * @see com.yuwubao <br>
 * @since V1.0<br>
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableTransactionManagement
//@ImportResource({"classpath:spring-datasource.xml"})
public class SpringBootScan extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        //super.setRegisterErrorPageFilter(false);
        return application.sources(SpringBootScan.class);
    }

    public static void main(String[] args) throws Exception {
        SpringApplication.run(SpringBootScan.class, args);
    }
}
